<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>更新时间管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		var ch =  new Array();
		var i = 0;
		function change(iid){
			var time = $('[name="'+iid+'time"]').val();
			ch[i] = iid+"_"+time;
			i ++;
		}
		
		function sub(di){

			location.href = di+"/ta/updatetime/updateTime?str="+ch;

		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ta/updatetime/">更新时间列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="updatetime" action="${ctx}/ta/updatetime/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>开始时间：
				<input name="beginTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${updatetime.beginTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>结束时间:
				<input name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${updatetime.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<li>业务类型：
				<select name="wname" class="input-medium" >
					<option value="" >所有业务</option>
					<c:forEach items="${ls}" var="ls">
						<option value="${ls}">${ls}</option>
					</c:forEach>
				</select>
			</li>
			<li>申请单位：
				<form:input path="name" htmlEscape="false" maxlength="512" class="input-medium"/>
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
				<input class="btn btn-primary" onclick="sub('${ctx}')" type="button" value="提交"/>
			</li>
			<li class="btns">
				
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>业务编号</th>
				<th>业务类型</th>
				<th>申请单位</th>
				<th>开始时间</th>
				<shiro:hasPermission name="ta:updatetime:edit"><th>处理</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach varStatus="i" items="${page.list}" var="updatetime">
			<tr>
				<td>
					${i.count}
				</td>
				<td>
					${updatetime.iid}
				</td>
				<td>
					${updatetime.wname}
				</td>
				<td>
					${updatetime.name}
				</td>
				<td>
					<input onchange="change('${updatetime.iid}')" type="text" value="<fmt:formatDate value="${updatetime.time}" pattern="yyyy-MM-dd HH:mm:ss" />" name="${updatetime.iid}time" htmlEscape="false" maxlength="512" class="input-medium" />
				</td>
				<shiro:hasPermission name="ta:updatetime:edit"><td>
    				<a href="${ctx}/ta/updatetime/formiid?iid=${updatetime.iid}">时间维护</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>